package micropascalcomp.FSA;

import micropascalcomp.FSA.FSABehavior;
import java.io.FileReader;
import java.io.LineNumberReader;
import micropascalcomp.MP_Token;

/******************************************
 * 
 * GetIdentifier
 * Takes a string as input and outputs a valid comment token
 * @author Jason Welch, Codi Gann, Jamal Martin
 * 
 *******************************************/
public class GetComments implements FSABehavior{
	
	private String inputString;
	private int    cursor;
	
	private char openingBrace = 123;
	private char closingBrace = 125;
				
	GetComments(String input, int c){
		inputString = input;
		cursor = c;
	}
	/*
	public IdentifierTokens fsa(){
		
		if (inputString.charAt(cursor) != openingBrace) return new IdentifierTokens("MP_ERROR",Character.toString(inputString.charAt(cursor)),cursor);
		
		String lex = Character.toString(inputString.charAt(cursor));
		int start = cursor;
		
		//How do we handle nested comments such as 
		//{asdasd{sadsfasd} or {adsfasdf{asdfasd}sadf}?!?!
		while (cursor<inputString.length() && inputString.charAt(cursor) != closingBrace ){
			cursor ++;
			lex = lex.concat(Character.toString(inputString.charAt(cursor)));
		}
		
		
		return new IdentifierTokens("MP_COMMENT",lex,start);
		
	}
	*/

	@Override
	public MP_Token getToken(FileReader file, LineNumberReader inFile,
			int colNum) {
		// TODO Auto-generated method stub
		return null;
	}
	
}//end class
